Skip to content

fix(lsp): send initial workspace configuration#5277

Merged
can1357 merged 1 commit into
mainfrom
farm/6666368b/pyright-did-change-configuration
Jul 14, 2026
Merged

fix(lsp): send initial workspace configuration#5277
can1357 merged 1 commit into
mainfrom
farm/6666368b/pyright-did-change-configuration

Conversation

@roboomp

@roboomp roboomp commented Jul 12, 2026

Copy link
Copy Markdown
Collaborator

Repro

A focused fake-LSP regression reproduces the startup sequence from #5276: bun test packages/coding-agent/test/tools/lsp-regressions.test.ts -t "sends initial workspace configuration" failed on the baseline because the client sent initialize, initialized, then textDocument/hover; workspace/didChangeConfiguration was absent.

Cause

packages/coding-agent/src/lsp/client.ts#getOrCreateClient advertised workspace.configuration support in CLIENT_CAPABILITIES, completed initialize, sent initialized, and immediately marked the client ready without sending the initial workspace configuration notification that Pyright waits on before servicing semantic requests.

Fix

  • Sent workspace/didChangeConfiguration with { settings: config.settings ?? {} } immediately after initialized and before publishing the client as ready.
  • Added a fake-LSP regression asserting the JSON-RPC order initializeinitializedworkspace/didChangeConfiguration → semantic textDocument/hover.
  • Added a changelog entry for the Pyright LSP startup hang fix.

Verification

bun test packages/coding-agent/test/tools/lsp-regressions.test.ts -t "sends initial workspace configuration" now passes: 1 pass, 0 fail. bun test packages/coding-agent/test/tools/lsp-regressions.test.ts passes: 58 pass, 0 fail. gh_push_branch completed the pre-publish gate before pushing. Fixes #5276

Sent workspace/didChangeConfiguration after initialized so servers waiting for client configuration finish startup before semantic requests.

Added a fake-LSP regression covering notification order and settings payload.

Fixes #5276
@github-actions github-actions Bot added the vouched Passed the vouch gate label Jul 12, 2026
@can1357 can1357 merged commit 1e81cde into main Jul 14, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

vouched Passed the vouch gate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

LSP: Pyright semantic requests hang because initialization omits didChangeConfiguration

2 participants